home *** CD-ROM | disk | FTP | other *** search
Wrap
VERSION 2.00 Begin Form Fademe BackColor = &H00FFFFFF& BorderStyle = 3 'Fixed Double Caption = "Software Registration" ClientHeight = 5760 ClientLeft = 390 ClientTop = 495 ClientWidth = 9180 ControlBox = 0 'False FontBold = -1 'True FontItalic = -1 'True FontName = "MS Sans Serif" FontSize = 30 FontStrikethru = 0 'False FontUnderline = 0 'False ForeColor = &H00FFFFFF& Height = 6165 Left = 330 LinkTopic = "Form1" MaxButton = 0 'False MinButton = 0 'False ScaleHeight = 5760 ScaleWidth = 9180 Top = 150 Width = 9300 Begin SSPanel Panel3D8 Alignment = 1 'Left Justify - MIDDLE AutoSize = 3 'AutoSize Child To Panel BackColor = &H00C0C0C0& BevelOuter = 1 'Inset Caption = "Panel3D3" Font3D = 0 'None ForeColor = &H00800000& Height = 645 Left = 8280 TabIndex = 11 Top = 4920 Width = 1005 Begin SSCommand Command3D3 AutoSize = 2 'Adjust Button Size To Picture BevelWidth = 0 Font3D = 0 'None Height = 615 Left = 15 Outline = 0 'False Picture = FADEME!.FRX:0000 TabIndex = 12 Top = 15 Width = 975 End End Begin SSPanel Panel3D7 Alignment = 1 'Left Justify - MIDDLE AutoSize = 3 'AutoSize Child To Panel BackColor = &H00C0C0C0& BevelOuter = 1 'Inset BevelWidth = 3 BorderWidth = 0 Caption = "Panel3D6" Font3D = 0 'None ForeColor = &H00800000& Height = 375 Left = 2040 TabIndex = 10 Top = 3240 Visible = 0 'False Width = 375 End Begin SSPanel Panel3D6 Alignment = 1 'Left Justify - MIDDLE AutoSize = 3 'AutoSize Child To Panel BackColor = &H00C0C0C0& BevelOuter = 1 'Inset BevelWidth = 3 BorderWidth = 0 Caption = "Panel3D6" Font3D = 0 'None ForeColor = &H00800000& Height = 375 Left = 2040 TabIndex = 9 Top = 2760 Visible = 0 'False Width = 375 End Begin Timer Timer1 Enabled = 0 'False Interval = 2000 Left = 1920 Top = 2160 End Begin SSPanel Panel3D1 Alignment = 0 'Left Justify - TOP BackColor = &H00C0C0C0& BevelWidth = 3 BorderWidth = 0 Caption = "Setup ..." Font3D = 4 'Inset w/heavy shading FontBold = -1 'True FontItalic = -1 'True FontName = "MS Sans Serif" FontSize = 30 FontStrikethru = 0 'False FontUnderline = 0 'False ForeColor = &H00808080& Height = 2055 Left = 2400 TabIndex = 0 Top = 1920 Width = 4935 Begin SSPanel Panel3D4 Alignment = 1 'Left Justify - MIDDLE AutoSize = 3 'AutoSize Child To Panel BackColor = &H00C0C0C0& BevelOuter = 1 'Inset Caption = "Panel3D3" Font3D = 0 'None ForeColor = &H00800000& Height = 645 Left = 3720 TabIndex = 7 Top = 1200 Width = 1005 Begin SSCommand Command3D2 AutoSize = 2 'Adjust Button Size To Picture BevelWidth = 0 Font3D = 0 'None Height = 615 Left = 15 Outline = 0 'False Picture = FADEME!.FRX:055A TabIndex = 8 Top = 15 Width = 975 End End Begin SSPanel Panel3D3 Alignment = 1 'Left Justify - MIDDLE AutoSize = 3 'AutoSize Child To Panel BackColor = &H00C0C0C0& BevelOuter = 1 'Inset Caption = "Panel3D3" Font3D = 0 'None ForeColor = &H00800000& Height = 645 Left = 3720 TabIndex = 5 Top = 480 Width = 1005 Begin SSCommand Command3D1 AutoSize = 2 'Adjust Button Size To Picture BevelWidth = 0 Font3D = 0 'None Height = 615 Left = 15 Outline = 0 'False Picture = FADEME!.FRX:0AB4 TabIndex = 6 Top = 15 Width = 975 End End Begin SSPanel Panel3D5 Alignment = 1 'Left Justify - MIDDLE AutoSize = 3 'AutoSize Child To Panel BackColor = &H00C0C0C0& BevelOuter = 1 'Inset BevelWidth = 2 BorderWidth = 0 Font3D = 0 'None ForeColor = &H00800000& Height = 375 Left = 360 TabIndex = 3 Top = 1320 Width = 3015 Begin TextBox Text2 BackColor = &H00800000& BorderStyle = 0 'None FontBold = -1 'True FontItalic = 0 'False FontName = "MS Sans Serif" FontSize = 12 FontStrikethru = 0 'False FontUnderline = 0 'False ForeColor = &H00FFFFFF& Height = 315 Left = 30 TabIndex = 4 Top = 30 Width = 2955 End End Begin SSPanel Panel3D2 Alignment = 1 'Left Justify - MIDDLE AutoSize = 3 'AutoSize Child To Panel BackColor = &H00C0C0C0& BevelOuter = 1 'Inset BevelWidth = 2 BorderWidth = 0 Font3D = 0 'None ForeColor = &H00800000& Height = 375 Left = 360 TabIndex = 1 Top = 840 Width = 3015 Begin TextBox Text1 BackColor = &H00800000& BorderStyle = 0 'None FontBold = -1 'True FontItalic = 0 'False FontName = "MS Sans Serif" FontSize = 12 FontStrikethru = 0 'False FontUnderline = 0 'False ForeColor = &H00FFFFFF& Height = 315 Left = 30 TabIndex = 2 Top = 30 Width = 2955 End End End Declare Function ShowWindow Lib "User" (ByVal hWnd As Integer, ByVal nCmdShow As Integer) As Integer Declare Function GetWindowText Lib "User" (ByVal hWnd As Integer, ByVal lpString As String, ByVal aint As Integer) As Integer Declare Function GetWindow Lib "User" (ByVal hWnd As Integer, ByVal wCmd As Integer) As Integer Declare Function GetTopWindow Lib "User" (ByVal hWnd As Integer) As Integer Declare Function IsWindowEnabled Lib "User" (ByVal hWnd As Integer) As Integer Declare Function IsWIndowVisible Lib "User" (ByVal hWnd As Integer) As Integer Declare Function GetWindowLong Lib "User" (ByVal hWnd As Integer, ByVal nIndex As Integer) As Long Declare Function SetWindowPos Lib "User" (ByVal hWnd As Integer, ByVal hWndInsertAfter As Integer, ByVal X As Integer, ByVal Y As Integer, ByVal cx As Integer, ByVal cy As Integer, ByVal wFlags As Integer) As Integer Declare Function GetModuleHandle% Lib "Kernel" (ByVal lpProgramName$) Declare Function GetModuleUsage% Lib "Kernel" (ByVal hProgram%) Declare Function GetActiveWindow Lib "User" () As Integer Declare Function SetFocusAPI Lib "user" Alias "SetFocus" (ByVal hWnd As Integer) As Integer Declare Sub SwitchToThisWindow Lib "User" (ByVal hWnd As Integer, ByVal OpenItUp As Integer) Declare Sub ClientToScreen Lib "User" (ByVal hWnd As Integer, lpPoint As POINTAPI) Declare Function SetWindowPos Lib "User" (ByVal hWnd As Integer, ByVal hWndInsertAfter As Integer, ByVal X As Integer, ByVal Y As Integer, ByVal cx As Integer, ByVal cy As Integer, ByVal wFlags As Integer) As Integer Declare Function BitBlt% Lib "gdi" (ByVal hDestDC%, ByVal X%, ByVal Y%, ByVal nWidth%, ByVal nHeight%, ByVal hSrcDC%, ByVal XSrc%, ByVal YSrc%, ByVal dwRop&) Declare Function GetModuleHandle Lib "Kernel" (ByVal lpModuleName As String) As Integer Declare Function Ctl3dRegister Lib "CTL3D.DLL" (ByVal hInstance As Integer) As Integer Declare Function Ctl3dAutoSubClass Lib "CTL3D.DLL" (ByVal hInstance As Integer) As Integer Declare Function Ctl3dUnregister Lib "CTL3D.DLL" (ByVal hInstance As Integer) As Integer Dim Inst% Sub Command1_Click () End Sub Sub Command1_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single) End Sub Sub Command3D1_Click () Dim NL NL = Chr(13) Const MB_OK = 0, MB_OKCANCEL = 1 ' Define buttons. Const MB_YESNOCANCEL = 3, MB_YESNO = 4 Const MB_ICONSTOP = 16, MB_ICONQUESTION = 32 ' Define Icons. Const MB_ICONEXCLAMATION = 48, MB_ICONINFORMATION = 64 Const MB_DEFBUTTON2 = 256, IDYES = 6, IDNO = 7 ' Define other. Dim DgDef, Msg, Response, Title ' Declare variables. Title = "Software Registration" ' Put together a sample message box with all the proper components. Msg = "Is this correct " & NL Msg = Msg & "Name: " & Text1.Text & NL Msg = Msg & "Company: " & Text2.Text DgDef = MB_YESNO + MB_ICONQUESTION + MB_DEFBUTTON2 ' Describe dialog. Response = MsgBox(Msg, DgDef, Title) ' Get user response. If Response = IDYES Then ' Evaluate response MsgBox "Thank You for using Geewiz Software.", 64, "Software Registration" ' and take appropriate Y% = Ctl3dUnregister(Inst%) Else ' action. Msg = "Try Again ...." Text1.Text = " " Text2.Text = " " Text1.SetFocus End If MsgBox Msg ' Display action taken. End Sub Sub Command3D2_Click () Y% = Ctl3dUnregister(Inst%) End Sub Sub Command3D3_Click () Dim NL, DgDef, Msg, Response, Title NL = Chr(13) Const MB_OK = 0 ' Define buttons. ' Declare variables. Title = "Instructions: " & NL ' Put together a sample message box with all the proper components. Msg = "Give Focus to the first text field " & NL Msg = Msg & "and Click your Right Mouse Button." & NL Msg = Msg & "Give Focus to the second text field " & NL Msg = Msg & "and Click your Right Mouse Button." & NL Msg = Msg & NL Msg = Msg & "As you will see in the source code" & NL Msg = Msg & "You can attach any help message to any" & NL Msg = Msg & "Object placed on any form." & NL Msg = Msg & NL Msg = Msg & "If you can Improve on the code" & NL Msg = Msg & "do so. Date the improvement and upload" & NL Msg = Msg & "The New Version ..." & NL MsgBox Title & Msg End Sub Sub Form_Load () Move 0, 0, Screen.Width, Screen.Height * .85 Inst% = GetModuleHandle("Sample.EXE") Y% = Ctl3dRegister(Inst%) Y% = Ctl3dAutoSubClass(Inst%) End Sub Sub Form_Paint () FadeForm Me End Sub Sub Form_Resize () FadeForm Me End Sub Sub Panel3D3_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single) If Timer1.Enabled = True Then Timer1.Enabled = False If Button = 2 Then CurrentX = X CurrentY = Y form1.Label1.AutoSize = True form1.Label1.Caption = " Click Me To Register this Software ... " 'Your little message to the user. form1.Label1.AutoSize = False form1.Label1.Width = form1.Label1.Width + 60 form1.Label1.Height = form1.Label1.Height + 30 form1.Width = form1.Label1.Width form1.Height = form1.Label1.Height form1.Label1.Left = 0 form1.Label1.Top = 0 form1.Top = Panel3D6.Top + Y 'Object you want to attach the message to. In this case a command button. form1.Left = Panel3D6.Left 'Places message right over the object. If form1.Top < 0 Then form1.Top = 0 If form1.Left + form1.Width > Screen.Width Then form1.Left = Screen.Width - form1.Width form1.Show 'wOn_Top% = SetWindowPos(Form1.hWnd, -1, 0, 0, 0, 0, wFlags = &H2 Or &H1 Or &H40 Or &H10) End If End Sub Sub Text1_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single) If Timer1.Enabled = True Then Timer1.Enabled = False If Button = 2 Then CurrentX = X CurrentY = Y form1.Label1.AutoSize = True form1.Label1.Caption = " Enter your Full Name here please ... " 'Your little message to the user. form1.Label1.AutoSize = False form1.Label1.Width = form1.Label1.Width + 60 form1.Label1.Height = form1.Label1.Height + 30 form1.Width = form1.Label1.Width form1.Height = form1.Label1.Height form1.Label1.Left = 0 form1.Label1.Top = 0 form1.Top = Panel3D6.Top + Y 'Object you want to attach the message to. In this case a Text field. form1.Left = Panel3D6.Left 'Places message right over the object. If form1.Top < 0 Then form1.Top = 0 If form1.Left + form1.Width > Screen.Width Then form1.Left = Screen.Width - form1.Width form1.Show 'Pretty simple huh? 'wOn_Top% = SetWindowPos(Form1.hWnd, -1, 0, 0, 0, 0, wFlags = &H2 Or &H1 Or &H40 Or &H10) End If End Sub Sub Text1_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single) If Button = 2 Then Timer1.Enabled = True End Sub Sub Text2_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single) If Timer1.Enabled = True Then Timer1.Enabled = False If Button = 2 Then CurrentX = X CurrentY = Y form1.Label1.AutoSize = True form1.Label1.Caption = " Enter your Company Name here please ... " 'Your little message to the user. form1.Label1.AutoSize = False form1.Label1.Width = form1.Label1.Width + 60 form1.Label1.Height = form1.Label1.Height + 30 form1.Width = form1.Label1.Width form1.Height = form1.Label1.Height form1.Label1.Left = 0 form1.Label1.Top = 0 form1.Top = Panel3D7.Top + Y 'Object you want to attach the message to. In this case a Text Field. form1.Left = Panel3D7.Left 'Places message right over the object. If form1.Top < 0 Then form1.Top = 0 If form1.Left + form1.Width > Screen.Width Then form1.Left = Screen.Width - form1.Width form1.Show 'Pretty simple Huh? 'wOn_Top% = SetWindowPos(Form1.hWnd, -1, 0, 0, 0, 0, wFlags = &H2 Or &H1 Or &H40 Or &H10) End If End Sub Sub Text2_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single) If Button = 2 Then Timer1.Enabled = True End Sub Sub Timer1_Timer () Unload form1 End Sub